package com.javabasic.basic_learning;

/**
 * @Author xiongmin
 * @ClassName StringTest
 * @Description TODO
 * @Date 2019/8/15 15:53
 * @Version 1.0
 *
 * link: [java中，字符串拼接方式与效率分析](https://www.cnblogs.com/lojun/articles/9664794.html)
 **/
public class StringTest {

    public static void main(String[] args) {

        String str = "hello";
        System.out.println(str);
        str = str + " world";
        System.out.println(str);
        str = "hello" + "nihao";
        System.out.println(str);

        TestStatic.test2();
    }
}

class TestStatic {

    private static  TestStatic testStatic = new TestStatic();

    public void test1() {
        System.out.println("我是一个非静态方法");
    }

    public static void test2() {
        testStatic.test1();
        System.out.println("我是一个静态方法");
    }
}